package com.newtouch.fileupload.model;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.data.annotation.CreatedDate;
import org.springframework.data.annotation.Id;
import org.springframework.data.annotation.LastModifiedDate;
import org.springframework.data.mongodb.core.mapping.Document;
import org.springframework.data.mongodb.core.mapping.Field;

import java.util.Date;

/***
 * 上传文件元数据信息
 */

@Data
@NoArgsConstructor
@AllArgsConstructor
@Document("meta_files")
public class FileEO {

    @Id
    @Field("_id")
    private String id;

    //追溯号,唯一标识
    private String traceNo;

    //文件路径
    private String filePath;

    //文件大小
    private String fileSize;

    //原始文件后缀
    private String fileSuffix;

    //原始文件名
    private String fileName;

    //文件md5
    private String fileMd5;

    //文件上传状态: 0--未上传,1--部分上传，2--已上传完整
    private Integer fileStatus;

    @CreatedDate
    private Date createdDt;
    @LastModifiedDate
    private Date updatedDt;
}
